﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace 软件发布平台.ViewModel
{
    public class AppRunRecordViewModel:Notify
    {
        private List<AppItem> _AppItems = new List<AppItem>() { };
        public List<AppItem> AppItems
        {
            get => _AppItems;
            set { _AppItems = value; RaisePropertyChanged("AppItems"); }
        }

        public class AppItem : Notify
        {
            string _Cus;

            public string Cus
            {
                get { return _Cus; }
                set { _Cus = value;}
            }

            string _Pro;

            public string Pro
            {
                get { return _Pro; }
                set { _Pro = value; }
            }

            string _AppName;

            public string AppName
            {
                get { return _AppName; }
                set { _AppName = value;}
            }

            string _Ver;

            public string Ver
            {
                get { return _Ver; }
                set { _Ver = value; }
            }
            string _RunTime;

            public string RunTime
            {
                get { return _RunTime; }
                set { _RunTime = value; }
            }
            string _User;

            public string User
            {
                get { return _User; }
                set { _User = value; }
            }
            string _IP;

            public string IP
            {
                get { return _IP; }
                set { _IP = value; }
            }
            string _RunMsg;
            public string RunMsg
            {
                get { return _RunMsg; }
                set { _RunMsg = value; }
            }
            SolidColorBrush _RunMsgColor = new SolidColorBrush(Color.FromRgb(238, 238, 133));
            public SolidColorBrush RunMsgColor
            {
                get { return _RunMsgColor; }
                set { _RunMsgColor = value; }
            }
            SolidColorBrush _BackColor = new SolidColorBrush(Color.FromRgb(238, 238, 133));
            public SolidColorBrush BackColor
            {
                get { return _BackColor; }
                set { _BackColor = value; }
            }
        }
        public class Notify : INotifyPropertyChanged
        {
            public event PropertyChangedEventHandler PropertyChanged;
            protected virtual void RaisePropertyChanged(string propertyname)
            {
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyname));
            }
        }
    }
}
